﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using FwProject.Comm.ExcelUtil;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace FwProject.PrePaymentInfo.Dto
{
    [AutoMap(typeof(PrePaymentInfoModel))]
    [DisplayName(displayName: "预收款")]
    public class PrePaymentInfoOutputDto:EntityDto<Guid>
    {

        [Display(Name = "所属工厂")]
        public Guid FactoryinfoId { get; set; }

        [DisplayName(displayName: "预收款单号")]
        [ExcelDateMember]
        public string PrePaymentInfoNumber { get; set; }
        /// <summary>
        /// 账户编号
        /// </summary>
        [Required(ErrorMessage ="{0}不能为空")]
        public Guid CapitalAccountId { get; set; }
        /// <summary>
        /// 账号
        /// </summary>
        [DisplayName(displayName: "账号")]
        [ExcelDateMember]
        public string AccountNo { get; set; }
        /// <summary>
        /// 账户名称
        /// </summary>
        [Required(ErrorMessage ="{0}不能为空")]
        [DisplayName(displayName: "账户名称")]
        [ExcelDateMember]
        public string AccountName { get; set; }
        /// <summary>
        /// 经办人ID
        /// </summary>
        [Required(ErrorMessage ="{0}不能为空")]
        public long AgentPeoperUserId { get; set; }
        /// <summary>
        /// 经办人姓名
        /// </summary>
        [Required(ErrorMessage ="{0}不能为空")]
        [DisplayName(displayName: "经办人")]
        [ExcelDateMember]
        public string AgentPeoper { get; set; }
        /// <summary>
        /// 餐厅名称
        /// </summary>
        [Required(ErrorMessage ="{0}不能为空")]
        [DisplayName(displayName: "餐厅")]
        [ExcelDateMember]
        public string RestaurantInfoName { get; set; }
        /// <summary>
        /// 餐厅编号
        /// </summary>
        public Guid RestaurantInfoId { get; set; }
        /// <summary>
        /// 收退金额
        /// </summary>
        [Required(ErrorMessage ="{0}不能为空")]
        [DisplayName(displayName: "金额")]
        [ExcelDateMember]
        public decimal PrePaymentPrice { get; set; } = 0.0m;

        /// <summary>
        /// 退还前的余额
        /// </summary>
        
        public decimal PreviousPrice { get; set; } = 0m;

        /// <summary>
        /// 备注
        /// </summary>
        [DisplayName(displayName: "备注")]
        [ExcelDateMember]
        public string RemarkContent { get; set; }
        /// <summary>
        /// 收退类型
        /// </summary>
        [DisplayName(displayName: "类型")]
        [ExcelDateMember]
        public PrePaymentInfoType PrePaymentInfoType { get; set; } = PrePaymentInfoType.收预交金;

        [DisplayName(displayName: "状态")]
        [ExcelDateMember]
        public PrePaymentInfoStatus PrePaymentInfoStatus { get; set; } = PrePaymentInfoStatus.未提交;

        [DisplayName(displayName: "创建时间")]
        [ExcelDateMember]
        public DateTime CreationTime { get; set; }
    }


    public class AdvanceOverageOutputDto
    {
        /// <summary>
        /// 餐厅名称
        /// </summary>
        public string RestaurantInfoName { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public string Principal { get; set; }

        /// <summary>
        /// 手机
        /// </summary>
        public string Mobile { get; set; }

        /// <summary>
        /// 预收款余额
        /// </summary>
        public decimal Overage { get; set; }
    }
}
